<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('check表格页')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>页面名称：</label>
                            <input type="text" name="pageName"/>
                        </li>
                        <li>
                            <label>页面类型：</label>
                            <select name="pageType" th:with="type=${@dict.getType('wfl_page_type')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <input type="hidden" name="sts" value="1"/>
                            <input type="hidden" name="pageIds" th:value="${pageIds}"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var pageTypeDatas = [[${@dict.getType('wfl_page_type')}]];
    var stsDatas = [[${@dict.getType('workflowsts')}]];
    var prefix = ctx + "workflow/pageTemplate";
    $(function () {
        var options = {
            url: prefix + "/list",
            modalName: "流程页面模板",
            columns: [{
                checkbox: true
            },
                {
                    field: 'pageId',
                    title: '模板页面编号'
                },
                {
                    field: 'pageName',
                    title: '页面名称'
                },
                {
                    field: 'pageType',
                    title: '页面类型',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(pageTypeDatas, value);
                    }
                },
                {
                    field: 'pcPageUrl',
                    title: '页面路径'
                },
                {
                    field: 'sts',
                    title: '状态',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(stsDatas, value);
                    }
                }]
        };
        $.table.init(options);
    });

    function getSelections() {
        return $.table.selectFirstColumns();
    }
</script>
</body>
</html>